package keeto.com.vn.classfied.model;

import java.io.Serializable;

import org.json.JSONException;
import org.json.JSONObject;


public class UserUIModel implements Serializable{
	
	private static final long serialVersionUID = 3379367349953130644L;
	private String username = "";
	private String userId = "";
	private String displayName = "";
	private String displayPictureUrl = "";
	
	public String getUsername() {
		return username;
	}
	public void setUsername(String userName) {
		this.username = userName;
	}
	public String getUserId() {
		return userId;
	}
	public void setUserId(String userId) {
		this.userId = userId;
	}
	public String getDisplayName() {
		return displayName;
	}
	public void setDisplayName(String displayName) {
		this.displayName = displayName;
	}
	
	public String getDisplayPictureUrl() {
		return displayPictureUrl;
	}
	
	
	public void setDisplayPictureUrl(String displayPictureUrl) {
		this.displayPictureUrl = displayPictureUrl;
	}
	public String toJSONString(boolean withSeperator) throws JSONException{
		JSONObject obj = new JSONObject();
		obj.put("username", username);
		obj.put("userId", userId);
		obj.put("displayName", displayName);
		
		if(!withSeperator){
			return obj.toString();
		}else{
			return ClickSpanParser.PATTERN_START 
			+ obj.toString()
			+ ClickSpanParser.PATTERN_END;
		}
		
	}
	
}
